package cn.harry.cabinet.model.entity

import androidx.room.Entity
import androidx.room.Index
import androidx.room.PrimaryKey
import java.util.Date

/**
 * 配置表
 */
@Entity(
    tableName = "configurations",
    indices = [Index(value = ["type", "key"], unique = true)]
)
data class Configuration(
    @PrimaryKey(autoGenerate = true)
    val id: Long = 0,
    
    /** 类型 */
    val type: String,
    
    /** 键 */
    val key: String,
    
    /** 值 */
    val value: String,
    
    /** 创建时间 */
    val createTime: Date = Date(),
    
    /** 修改时间 */
    val updateTime: Date = Date()
)